package org.linlinjava.litemall.db.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.linlinjava.litemall.db.models.Order;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

public interface OrderService extends IService<Order> {

    public int count(Long userId);

    public Order findById(Long userId, Long orderId) ;

    public int countByOrderSn(Long userId, String orderSn) ;

    public String generateOrderSn(Long userId) ;

    public IPage<Order> queryByOrderStatus(Long userId, List<Short> orderStatus, Integer pageNo, Integer pageSize) ;

    public IPage<Order> querySelective(Long userId, String orderSn, LocalDateTime start, LocalDateTime end, List<Short> orderStatusArray, Integer pageNo, Integer pageSize) ;

    public int count() ;

    public List<Order> queryUnpaid(int minutes) ;

    public List<Order> queryUnconfirm(int days) ;

    public Order findBySn(String orderSn) ;

    public Map<Object, Object> orderInfo(Long userId) ;

    public List<Order> queryComment(int days) ;

    public void updateAfterSaleStatus(Long orderId, Short statusReject) ;

    public Map<String, Object> queryVoSelective(String nickname, String consignee, String orderSn, LocalDateTime start, LocalDateTime end, List<Short> orderStatusArray, Integer pageNo, Integer pageSize) ;
}
